package xkp.lesson.consumer.entity;

public class MQMessage<T> {
    //用户唯一识别token,用于标识是谁发送的数据
    private String token;
    //消息数据
    private T data;
    //数据的备注信息
    private String msg;
    //消息的状态码
    private Integer code;

    public MQMessage() {
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    @Override
    public String toString() {
        return "MQMessage{" +
                "token='" + token + '\'' +
                ", data=" + data +
                ", msg='" + msg + '\'' +
                ", code=" + code +
                '}';
    }
}
